﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="CarListByTag.aspx.vb" Inherits="Final_Web_2._0_site_1.CarListByTag" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />

        <asp:Button ID="btnBackup" runat="server" Text="Back" />

        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="CarListByTagSqlDataSource1" 
            GridLines="None" AllowSorting="True" ForeColor="#333333">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="Picture">
                
                 <ItemTemplate>
                 <asp:Image ID="Image1" runat = "server" ImageUrl ='<%# Eval("CarPicture") %>' CssClass ="CarInDetailImageSize" /> 
                 <br />
                 Model:  <%# Eval("CarModelName")%><br />
                 Year: <%# Eval("CarModelYear")%><br />
                 CC: <%# Eval("CC")%><br />
                 Colour: <%# Eval("CarColour")%><br />
                 <asp:HyperLink ID="Hyperlink2" NavigateUrl = ' <%# Eval("CarInfoURL","{0}") %>' runat ="server">More
                 </asp:HyperLink>
                 </ItemTemplate>               

                </asp:TemplateField>

            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="CarListByTagSqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MercedesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:MercedesConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT DISTINCT [CarModelName], [CarModelYear], [CC], [CarColour], [CarPicture], [CarInfoURL] FROM [TagsAndCarInDetailViewQuery] WHERE ([TagName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
</asp:Content>
